<template>
	<div>

		<Reply :data="data" />
		
	</div>
</template>


<script>
	
	//导入子组件
	import Reply from './Reply.vue';
	
	export default{

		data(){

			return {

				data:{}

			}

		},
		//钩子方法
		mounted:function(){


			//调用接口
			this.get_list();

		},
		//注册组件
		components:{
			Reply
		},
		methods:{

			//获取数据
			get_list:function(){

this.axios.get('http://localhost:8000/mytree/').then((result) =>{

					//定义root
					var mytree = {'id':0,name:''};
					mytree['childlist'] = result.data;
					//赋值操作
					this.data = mytree;
				});

			}

		}
		
	};
	

</script>


<style>
	


</style>